
import request from '../../utils/request'

//调拨单明细
export  function getTransferDesc(saleOrganizationID:string,id:string,shopID:string) {
  return request({
    url: '/sale/ShopAllocation/allocateListMoreCs',
    method: 'get', 
    params:{saleOrganizationID,id,shopID}
  })
}

//退回调拨单 
export  function backOrder(saleOrganizationID:string,id:string) {
  return request({
    url: `/sale/ShopAllocation/backCs`,
    method: 'get',
    params:{saleOrganizationID,id}
  })
}

interface IReceiveAllocationDto{
  shopAllocationID:string
  saleOrganizationID:string
  outShopID:string
  enterShopID:string
  outShopName:string
  enterShopName:string
  receiveGoodsDtos:Array<any>
}
//接收调拨单 
export  function receiveOrder(receiveAllocationDto:IReceiveAllocationDto) {
  return request({
    url: '/sale/ShopAllocation/receiveCs',
    method: 'post', 
    data:receiveAllocationDto
  })
}

//撤回调拨
export  function withDrawOrder(saleOrganizationID:string,id:string) {
  return request({
    url: `/sale/ShopAllocation/withdrawCs`,
    method: 'get',
    params:{saleOrganizationID,id}
  })
}


